//
//  HWzhongxingPersonalCenterTableViewCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2020/9/22.
//  Copyright © 2020 Chendaobin. All rights reserved.
//

#import "HWzhongxingPersonalCenterTableViewCell.h"
#import "HWoftenwanView.h"

@interface HWzhongxingPersonalCenterTableViewCell()
@property(strong,nonatomic) HWoftenwanView *oftenwanView;


@end



@implementation HWzhongxingPersonalCenterTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
          
          [self setUpUI];
          
      }
      
      return  self;
    
    
    
    
}


- (void)setUpUI {
    
    
    
    self.contentView.backgroundColor = RGB(247, 247, 247);
    
    
    self.oftenwanView = [[HWoftenwanView alloc]initWithFrame: CGRectMake(20, 0, kScreenW-40, self.frame.size.height)];
    self.oftenwanView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.self.oftenwanView];
    
    
    
    
}


- (void)shuxiangCell {
    
    
    
      self.oftenwanView.data1Arr = self.data1Arr;
      self.oftenwanView.data2Arr =  self.data2Arr;
      self.oftenwanView.data3Arr = self.data3Arr;
      self.oftenwanView.xuanzhongTag =  self.xuanzhongTag;
    
    
      if (self.xuanzhongTag == 0 ) {
          
          if (self.data1Arr.count > 0 ) {
              
              self.oftenwanView.frame  = CGRectMake(20, 0, kScreenW-40, self.data1Arr.count*62);
              
              
          } else {
              
              
                 self.oftenwanView.frame  = CGRectMake(20, 0, kScreenW-40, 100);
              
          }
              
            
           
         
          
          
    
      } else if (self.xuanzhongTag == 1) {
          
          
          if (self.data2Arr.count > 0 ) {
                      
              self.oftenwanView.frame  = CGRectMake(20, 0, kScreenW-40, self.data2Arr.count*62);
              
              
          } else {
                      
                      
                 self.oftenwanView.frame  = CGRectMake(20, 0, kScreenW-40, 100);
                      
          }
                  
          
          
          
          
          
          
      } else  {
          
          
          if (self.data3Arr.count > 0 ) {
                               
                self.oftenwanView.frame  = CGRectMake(20, 0, kScreenW-40, self.data3Arr.count*62);
          } else {
                               
                               
                self.oftenwanView.frame  = CGRectMake(20, 0, kScreenW-40, 100);
                               
          }
                           
                   
          
      }
    
    
      [self.oftenwanView QC_refreshData];
    
    
    
    
    
}






@end
